package com.sky.context;
/**
 * @description: 设置线程值的封装的方法
 * @param:
 * @return:
 * @author Wait葡萄成熟时
 * @date: 上午12:11 2024/11/3
 *
 */

public class BaseContext {

    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }

    public static Long getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

}
